<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsecure: xsecure_ellipticplat.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsecure
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xsecure__ellipticplat_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xsecure_ellipticplat.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains the implementation of the interface functions for ECC engine specific to Versal Net platform. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
5.0   dc   07/10/22 Initial release
      am   07/23/22 Removed Ecdsa_ModEccOrder function definition, as it is
                    declared in Ecdsa.h file
      dc   09/04/22 set TRNG to HRNG mode after Private key ECC mod order
5.1   har  01/06/23 Add support to generate ephemeral key
5.2   yog  05/18/23 Updated the flow for Big Endian ECC Mode setting
      yog  08/07/23 Replaced trng API calls using trngpsx driver
      dd   10/11/23 MISRA-C violation Rule 10.3 fixed
5.3   har  11/01/23 Updated core API for ECDH
      kpt  11/24/23 Replace Xil_SMemSet with Xil_SecureZeroize
      kpt  01/09/24 Updated option for non-blocking trng reseed
      ss   04/05/24 Fixed doxygen warnings</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gab50d8d53c6a959b985095de243e7d5c9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__ecdsa__server__apis.html#gab50d8d53c6a959b985095de243e7d5c9">XSECURE_ECC_TRNG_DF_LENGTH</a>&#160;&#160;&#160;(2U)</td></tr>
<tr class="memdesc:gab50d8d53c6a959b985095de243e7d5c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default length of xilsecure ecc true random number generator.  <a href="group__xsecure__ecdsa__server__apis.html#gab50d8d53c6a959b985095de243e7d5c9">More...</a><br/></td></tr>
<tr class="separator:gab50d8d53c6a959b985095de243e7d5c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4b82c9f2c323f6a642a469b883a85bef"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__ecdsa__server__apis.html#ga4b82c9f2c323f6a642a469b883a85bef">XSECURE_ECC_TRNG_RANDOM_NUM_GEN_LEN</a>&#160;&#160;&#160;(60U)</td></tr>
<tr class="memdesc:ga4b82c9f2c323f6a642a469b883a85bef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Length of xilsecure ecc true random number generator.  <a href="group__xsecure__ecdsa__server__apis.html#ga4b82c9f2c323f6a642a469b883a85bef">More...</a><br/></td></tr>
<tr class="separator:ga4b82c9f2c323f6a642a469b883a85bef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0219841abd9a6a67cd5e80f8a5ec0d30"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_ecdsa_crv_info.html">EcdsaCrvInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__ecdsa__server__apis.html#ga0219841abd9a6a67cd5e80f8a5ec0d30">XSecure_EllipticGetCrvData</a> (<a class="el" href="group__xsecure__common__apis.html#ga7aecdb57be4a4242f11ad3e3bebb42e6">XSecure_EllipticCrvTyp</a> CrvTyp)</td></tr>
<tr class="memdesc:ga0219841abd9a6a67cd5e80f8a5ec0d30"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function gets the curve related information.  <a href="group__xsecure__ecdsa__server__apis.html#ga0219841abd9a6a67cd5e80f8a5ec0d30">More...</a><br/></td></tr>
<tr class="separator:ga0219841abd9a6a67cd5e80f8a5ec0d30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga261ca30dbb2a3390cac39562e499f63a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__ecdsa__server__apis.html#ga261ca30dbb2a3390cac39562e499f63a">XSecure_EllipticPrvtKeyGenerate</a> (<a class="el" href="group__xsecure__common__apis.html#ga7aecdb57be4a4242f11ad3e3bebb42e6">XSecure_EllipticCrvTyp</a> CrvType, <a class="el" href="struct_x_secure___elliptc_private_key_gen.html">XSecure_ElliptcPrivateKeyGen</a> *PrivateKey)</td></tr>
<tr class="memdesc:ga261ca30dbb2a3390cac39562e499f63a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function generates 48-byte key for P-384 curve using TRNG.  <a href="group__xsecure__ecdsa__server__apis.html#ga261ca30dbb2a3390cac39562e499f63a">More...</a><br/></td></tr>
<tr class="separator:ga261ca30dbb2a3390cac39562e499f63a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9566bee278ec58acd705a67ee9d58766"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__ecdsa__server__apis.html#ga9566bee278ec58acd705a67ee9d58766">XSecure_EllipticGenerateEphemeralKey</a> (<a class="el" href="group__xsecure__common__apis.html#ga7aecdb57be4a4242f11ad3e3bebb42e6">XSecure_EllipticCrvTyp</a> CrvType, u32 EphemeralKeyAddr)</td></tr>
<tr class="memdesc:ga9566bee278ec58acd705a67ee9d58766"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function generates 48-byte ephemeral key for P-384 curve using TRNG.  <a href="group__xsecure__ecdsa__server__apis.html#ga9566bee278ec58acd705a67ee9d58766">More...</a><br/></td></tr>
<tr class="separator:ga9566bee278ec58acd705a67ee9d58766"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae456632737631e0943f3a473c1642f35"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__ecdsa__server__apis.html#gae456632737631e0943f3a473c1642f35">XSecure_EllipticGenEphemeralNSign</a> (<a class="el" href="group__xsecure__common__apis.html#ga7aecdb57be4a4242f11ad3e3bebb42e6">XSecure_EllipticCrvTyp</a> CrvType, const u8 *Hash, u32 HashLen, u8 *PrvtKey, u8 *Signature)</td></tr>
<tr class="memdesc:gae456632737631e0943f3a473c1642f35"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function generates the signature on provided hash using ecc.  <a href="group__xsecure__ecdsa__server__apis.html#gae456632737631e0943f3a473c1642f35">More...</a><br/></td></tr>
<tr class="separator:gae456632737631e0943f3a473c1642f35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab3835b878d2947b3f94ba4cd555dd641"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__ecdsa__server__apis.html#gab3835b878d2947b3f94ba4cd555dd641">XSecure_EcdhGetSecret</a> (<a class="el" href="group__xsecure__common__apis.html#ga7aecdb57be4a4242f11ad3e3bebb42e6">XSecure_EllipticCrvTyp</a> CrvType, u64 PrvtKeyAddr, u64 PubKeyAddr, u64 SharedSecretAddr)</td></tr>
<tr class="memdesc:gab3835b878d2947b3f94ba4cd555dd641"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is a wrapper function which calls the IPCores API to perform ECDH and generate shared secret.  <a href="group__xsecure__ecdsa__server__apis.html#gab3835b878d2947b3f94ba4cd555dd641">More...</a><br/></td></tr>
<tr class="separator:gab3835b878d2947b3f94ba4cd555dd641"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
